package boogui.member;
import java.io.File;

import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;

public class TestFile extends JDialog {

	public TestFile(JFrame p) {
		super(p);
		JFileChooser fileChooser = new JFileChooser();
		fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));

		int result = fileChooser.showOpenDialog(p);
		if (result == JFileChooser.APPROVE_OPTION) {
			// user selects a file
		}
		File selectedFile = fileChooser.getSelectedFile();

		System.out.println("Selected file: " + selectedFile.getAbsolutePath());
	}
}
